﻿@using Abp.Authorization.Users
@using LyyCMS.Web.Models.Common.Modals
@using LyyCMS.Web.Models.WeChat
@model EditWxAccountVIewModel
@{
    Layout = null;
}
@await Html.PartialAsync("~/Views/Shared/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(L("EditWxAccount")))
<form name="UserEditForm" role="form" class="form-horizontal">
    <input type="hidden" name="Id" value="@Model.wxAccount.Id" />
    <div class="modal-body">
        <ul class="nav nav-tabs" role="tablist">
            <li class="nav-item">
                <a class="nav-link active" data-toggle="tab" role="tab" href="#edit-user-details">@L("WxAccountDetails")</a>
            </li>
        </ul>
        <div class="tab-content mt-4">
            <div role="tabpanel" class="tab-pane container active" id="edit-user-details">
                <div class="form-group row required">
                    <label class="col-md-3 col-form-label" for="name">@L("Name")</label>
                    <div class="col-md-9">
                        <input id="name" type="text" name="Name" class="form-control" value="@Model.wxAccount.Name"  required maxlength="@AbpUserBase.MaxNameLength" minlength="2">
                    </div>
                </div>
                <div class="form-group row required">
                    <label class="col-md-3 col-form-label" for="appid">@L("AppId")</label>
                    <div class="col-md-9">
                        <input id="appid" type="text" class="form-control" name="AppId" value="@Model.wxAccount.AppId" required maxlength="@AbpUserBase.MaxNameLength" minlength="2">
                    </div>
                </div>
                <div class="form-group row required">
                    <label class="col-md-3 col-form-label" for="AppSecret">@L("AppSecret")</label>
                    <div class="col-md-9">
                        <input id="AppSecret" type="text" class="form-control" name="AppSecret" value="@Model.wxAccount.AppSecret" required maxlength="@AbpUserBase.MaxNameLength">
                    </div>
                </div>
                <div class="form-group row required">
                    <label class="col-md-3 col-form-label" for="Originalid">@L("Originalid")</label>
                    <div class="col-md-9">
                        <input id="Originalid" type="text" class="form-control" name="Originalid" value="@Model.wxAccount.Originalid" required maxlength="@AbpUserBase.MaxNameLength">
                    </div>
                </div>
                <div class="form-group row required">
                    <label class="col-md-3 col-form-label" for="Token">@L("Token")</label>
                    <div class="col-md-9">
                        <input id="Token" type="text" class="form-control" name="Token" value="@Model.wxAccount.Token" required maxlength="@AbpUserBase.MaxNameLength" minlength="2">
                    </div>
                </div>
                <div class="form-group row required">
                    <label class="col-md-3 col-form-label" for="originalid">@L("Originalid")</label>
                    <div class="col-md-9">
                        <input id="originalid" type="text" name="Originalid" class="form-control"value="@Model.wxAccount.Originalid"  required maxlength="@AbpUserBase.MaxNameLength" minlength="2">
                    </div>
                </div>
                <div class="form-group row required">
                    <label class="col-md-3 col-form-label" for="wechatcode">@L("WechatCode")</label>
                    <div class="col-md-9">
                        <input id="wechatcode" type="text" name="WechatCode" class="form-control"value="@Model.wxAccount.WechatCode"  required maxlength="@AbpUserBase.MaxNameLength" minlength="2">
                    </div>
                </div>

                <div class="form-group row required">
                    <label class="col-md-3 col-form-label" for="push">@L("PushToWeChat")</label>
                    <div class="col-md-9">
                        <input type="checkbox" name="Push" value="@Model.wxAccount.Push" id="push" checked/>
                    </div>
                </div>
                <div class="form-group row required">
                    <label class="col-md-3 col-form-label" for="sortid">@L("SortId")</label>
                    <div class="col-md-9">
                        <input id="sortid" type="number" name="SortId" class="form-control" required value="@Model.wxAccount.SortId">
                    </div>
                </div>
            </div>
        </div>
        @await Html.PartialAsync("~/Views/Shared/Modals/_ModalFooterWithSaveAndCancel.cshtml")
    </div>
</form>

<script src="~/view-resources/Views/Users/_EditModal.js" asp-append-version="true"></script>
